.class Lcom/instagram/android/fragment/fe;
.super Lcom/instagram/d/a;
.source "ReportProblemFragment.java"


# annotations
.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/instagram/d/a",
        "<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Boolean;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:Lcom/instagram/android/fragment/fa;

.field private final b:Landroid/content/Context;

.field private final c:Lcom/instagram/android/d/g/h;


# direct methods
.method private constructor <init>(Lcom/instagram/android/fragment/fa;Landroid/content/Context;Lcom/instagram/android/d/g/h;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 177
    iput-object p1, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-direct {p0}, Lcom/instagram/d/a;-><init>()V

    .line 178
    iput-object p2, p0, Lcom/instagram/android/fragment/fe;->b:Landroid/content/Context;

    .line 179
    iput-object p3, p0, Lcom/instagram/android/fragment/fe;->c:Lcom/instagram/android/d/g/h;

    .line 180
    return-void
.end method

.method synthetic constructor <init>(Lcom/instagram/android/fragment/fa;Landroid/content/Context;Lcom/instagram/android/d/g/h;Lcom/instagram/android/fragment/fb;)V
    .locals 0
    .parameter
    .parameter
    .parameter
    .parameter

    .prologue
    .line 172
    invoke-direct {p0, p1, p2, p3}, Lcom/instagram/android/fragment/fe;-><init>(Lcom/instagram/android/fragment/fa;Landroid/content/Context;Lcom/instagram/android/d/g/h;)V

    return-void
.end method

.method private a(Ljava/lang/String;)Z
    .locals 4
    .parameter

    .prologue
    .line 257
    invoke-static {}, Lcom/instagram/android/service/f;->a()Lcom/instagram/android/service/f;

    move-result-object v0

    .line 258
    const-class v1, Lcom/fasterxml/jackson/databind/JsonNode;

    invoke-virtual {v0, p1, v1}, Lcom/instagram/android/service/f;->readValue(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/fasterxml/jackson/databind/JsonNode;

    .line 260
    const-string v1, "bug_id"

    invoke-virtual {v0, v1}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 262
    const/4 v0, 0x1

    .line 269
    :goto_0
    return v0

    .line 265
    :cond_0
    const-string v1, "error_msg"

    invoke-virtual {v0, v1}, Lcom/fasterxml/jackson/databind/JsonNode;->get(Ljava/lang/String;)Lcom/fasterxml/jackson/databind/JsonNode;

    move-result-object v0

    .line 266
    if-eqz v0, :cond_1

    .line 267
    const-string v1, "ReportProblemFragment"

    new-instance v2, Ljava/lang/StringBuilder;

    invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V

    const-string v3, "Failed to report bug: "

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v0}, Lcom/fasterxml/jackson/databind/JsonNode;->asText()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Lcom/facebook/e/a/a;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 269
    :cond_1
    const/4 v0, 0x0

    goto :goto_0
.end method

.method private d()V
    .locals 4

    .prologue
    const/4 v1, 0x1

    .line 235
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->c(Lcom/instagram/android/fragment/fa;)Landroid/widget/EditText;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setEnabled(Z)V

    .line 236
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;)Landroid/widget/Button;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    .line 237
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;)Landroid/widget/Button;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->send:I

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    .line 239
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    new-instance v1, Lcom/instagram/ui/a/a;

    iget-object v2, p0, Lcom/instagram/android/fragment/fe;->b:Landroid/content/Context;

    invoke-direct {v1, v2}, Lcom/instagram/ui/a/a;-><init>(Landroid/content/Context;)V

    sget v2, Lcom/facebook/ba;->request_error:I

    invoke-virtual {v1, v2}, Lcom/instagram/ui/a/a;->a(I)Lcom/instagram/ui/a/a;

    move-result-object v1

    sget v2, Lcom/facebook/ba;->ok:I

    new-instance v3, Lcom/instagram/android/fragment/ff;

    invoke-direct {v3, p0}, Lcom/instagram/android/fragment/ff;-><init>(Lcom/instagram/android/fragment/fe;)V

    invoke-virtual {v1, v2, v3}, Lcom/instagram/ui/a/a;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/instagram/ui/a/a;

    move-result-object v1

    invoke-virtual {v1}, Lcom/instagram/ui/a/a;->b()Landroid/app/Dialog;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;Landroid/app/Dialog;)Landroid/app/Dialog;

    .line 249
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->d(Lcom/instagram/android/fragment/fa;)Landroid/app/Dialog;

    move-result-object v0

    invoke-virtual {v0}, Landroid/app/Dialog;->show()V

    .line 250
    return-void
.end method

.method private e()V
    .locals 2

    .prologue
    .line 253
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;)Landroid/widget/Button;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->thanks_for_feedback:I

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    .line 254
    return-void
.end method


# virtual methods
.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Boolean;
    .locals 4
    .parameter

    .prologue
    const/4 v1, 0x0

    .line 184
    invoke-static {}, Lcom/instagram/android/d/a/a;->a()Lcom/instagram/android/d/a/a;

    move-result-object v0

    .line 187
    :try_start_0
    iget-object v2, p0, Lcom/instagram/android/fragment/fe;->c:Lcom/instagram/android/d/g/h;

    invoke-virtual {v0, v2}, Lcom/instagram/android/d/a/a;->a(Lcom/instagram/android/d/c/g;)Lch/boye/httpclientandroidlib/HttpResponse;
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result-object v0

    .line 193
    :try_start_1
    invoke-interface {v0}, Lch/boye/httpclientandroidlib/HttpResponse;->getEntity()Lch/boye/httpclientandroidlib/HttpEntity;

    move-result-object v2

    invoke-static {v2}, Lch/boye/httpclientandroidlib/util/EntityUtils;->toString(Lch/boye/httpclientandroidlib/HttpEntity;)Ljava/lang/String;

    move-result-object v2

    .line 194
    invoke-interface {v0}, Lch/boye/httpclientandroidlib/HttpResponse;->getEntity()Lch/boye/httpclientandroidlib/HttpEntity;

    move-result-object v3

    invoke-static {v3}, Lch/boye/httpclientandroidlib/util/EntityUtils;->consume(Lch/boye/httpclientandroidlib/HttpEntity;)V

    .line 195
    invoke-interface {v0}, Lch/boye/httpclientandroidlib/HttpResponse;->getStatusLine()Lch/boye/httpclientandroidlib/StatusLine;

    move-result-object v0

    .line 197
    if-eqz v0, :cond_0

    invoke-interface {v0}, Lch/boye/httpclientandroidlib/StatusLine;->getStatusCode()I

    move-result v0

    const/16 v3, 0xc8

    if-ne v0, v3, :cond_0

    invoke-direct {p0, v2}, Lcom/instagram/android/fragment/fe;->a(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_0

    const/4 v0, 0x1

    :goto_0
    invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_1

    move-result-object v0

    .line 203
    :goto_1
    return-object v0

    .line 188
    :catch_0
    move-exception v0

    .line 189
    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    goto :goto_1

    :cond_0
    move v0, v1

    .line 197
    goto :goto_0

    .line 201
    :catch_1
    move-exception v0

    .line 202
    const-string v2, "ReportProblemFragment"

    const-string v3, "Server request resulted in exception"

    invoke-static {v2, v3, v0}, Lcom/facebook/e/a/a;->d(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V

    .line 203
    invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;

    move-result-object v0

    goto :goto_1
.end method

.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 172
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/instagram/android/fragment/fe;->a([Ljava/lang/Void;)Ljava/lang/Boolean;

    move-result-object v0

    return-object v0
.end method

.method protected a(Ljava/lang/Boolean;)V
    .locals 2
    .parameter

    .prologue
    .line 220
    invoke-super {p0, p1}, Lcom/instagram/d/a;->a(Ljava/lang/Object;)V

    .line 222
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;Z)Z

    .line 223
    invoke-static {}, Lcom/instagram/a/c;->a()Lcom/instagram/a/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/a/c;->b()V

    .line 225
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;Lcom/instagram/android/fragment/fe;)Lcom/instagram/android/fragment/fe;

    .line 227
    invoke-virtual {p1}, Ljava/lang/Boolean;->booleanValue()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 228
    invoke-direct {p0}, Lcom/instagram/android/fragment/fe;->e()V

    .line 232
    :goto_0
    return-void

    .line 230
    :cond_0
    invoke-direct {p0}, Lcom/instagram/android/fragment/fe;->d()V

    goto :goto_0
.end method

.method protected bridge synthetic a(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 172
    check-cast p1, Ljava/lang/Boolean;

    invoke-virtual {p0, p1}, Lcom/instagram/android/fragment/fe;->a(Ljava/lang/Boolean;)V

    return-void
.end method

.method protected b_()V
    .locals 2

    .prologue
    const/4 v1, 0x0

    .line 209
    invoke-super {p0}, Lcom/instagram/d/a;->b_()V

    .line 210
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->c(Lcom/instagram/android/fragment/fa;)Landroid/widget/EditText;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/EditText;->setEnabled(Z)V

    .line 211
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;)Landroid/widget/Button;

    move-result-object v0

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setEnabled(Z)V

    .line 212
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    invoke-static {v0}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;)Landroid/widget/Button;

    move-result-object v0

    sget v1, Lcom/facebook/ba;->sending:I

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setText(I)V

    .line 214
    iget-object v0, p0, Lcom/instagram/android/fragment/fe;->a:Lcom/instagram/android/fragment/fa;

    const/4 v1, 0x1

    invoke-static {v0, v1}, Lcom/instagram/android/fragment/fa;->a(Lcom/instagram/android/fragment/fa;Z)Z

    .line 215
    invoke-static {}, Lcom/instagram/a/c;->a()Lcom/instagram/a/c;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/a/c;->b()V

    .line 216
    return-void
.end method
